package com.cloud.tio.tiocloud.Controller;

import com.cloud.tio.tiocloud.models.Result;
import com.cloud.tio.tiocloud.models.User;
import com.cloud.tio.tiocloud.server.UserServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController extends BaseController {
    @Autowired
    private UserServer userServer;


    @PostMapping("/add")
    public Result add(@RequestBody User user) {
        return result.success(userServer.add(user));
    }
}
